package chpt06;

import java.util.PriorityQueue;
import java.util.Queue;

public class QueueDemo02 {

	public static void main(String[] args) {
		Queue<StudentV3> queue = new PriorityQueue<>();
		queue.offer(new StudentV3("abx",18));
		queue.offer(new StudentV3("abc",20));
		queue.offer(new StudentV3("bax",17));
		while(!queue.isEmpty()) {
			System.out.println(queue.poll());
		}
	}
}
